// import req from "../req";
// import service from '@/utils/request'
import request from '@/utils/request-java'
// import tool from '@/utils/tool';
// 获取角色列表
export function RoleList(data) {
  return request({
    url: '/OaRoleController/list',
    method: 'get',
    params: data
  });
}

export function RolePerList(data) {
  // var a = {
  //   client_id: 1,
  //   api_token: req('Role/UserAuth'),
  //   token: tool.data.get("TOKEN")
  // }
  // console.log('Role/UserAuth',req('Role/UserAuth'));
  return request({
    url: '/OaAuthController/queryList',
    method: 'get',
    params: data
  });
}


// 新增
export function addRole(data) {
  return request({
    url: '/OaRoleController/add',
    method: 'post',
    params: data
  });
}

// 删除角色
export function deleteRole(data) {
  return request({
    url: '/OaRoleController/remove',
    method: 'delete',
    params: data
  });
}


// 切换状态
export function switchStatus(data) {
  return request({
    url: '/OaRoleController/edit',
    method: 'post',
    params: data
  });
}


// 获取权限树
export function getAuthList() {
  var a = {
    page:1,
    limit:99999
  }
  return request({
    url: '/OaAuthController/list',
    method: 'get',
    params: a
  });
}

// 修改权限
export function editAuth(data) {
  return request({
    url: '/OaRoleController/edit',
    method: 'post',
    params: data
  });
}